package com.ljx.excel.controller;

import com.ljx.excel.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2025-08-18  21:22
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping("/export/{type}")
    public void export(@PathVariable("type") Integer type,
                       HttpServletResponse response) {
        testService.export(response, type);
    }
}
